package com.xinchuang.domain.pojo;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;

/**
 * <p>
 * 
 * </p>
 *
 * @author zx
 * @since 2023-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class TestNoticeProductionTypeTable implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识ID
     */
    @TableId
    private String debugId;

    /**
     * 通知单ID
     */
    private String parentNoticeId;

    /**
     * 调试模数
     */
    private String modulusQuantity;

    /**
     * 生产模数
     */
    private String productionQuantity;

    /**
     * 合格品数
     */
    private String qualifiedQuantity;

    /**
     * 让步接收数
     */
    private String receiveQuantity;

    /**
     * 每模件数
     */
    private String moldNumber;

    /**
     * 单模重量
     */
    private String modelWeight;

    /**
     * 生产节拍
     */
    private String productionBeat;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Override
    public String toString() {
        StringBuffer buffer = new StringBuffer();
        if (StringUtils.isNotBlank(modulusQuantity)) {
            buffer.append("调试模数=" + modulusQuantity + ";");
        }
        if (StringUtils.isNotBlank(productionQuantity)) {
            buffer.append("生产模数=" + productionQuantity + ";");
        }
        if (StringUtils.isNotBlank(qualifiedQuantity)) {
            buffer.append("合格品数=" + qualifiedQuantity + ";");
        }
        if (StringUtils.isNotBlank(receiveQuantity)) {
            buffer.append("让步接收数=" + receiveQuantity + ";");
        }
        if (StringUtils.isNotBlank(moldNumber)) {
            buffer.append("每模件数=" + moldNumber + ";");
        }
        if (StringUtils.isNotBlank(modelWeight)) {
            buffer.append("单模重量=" + modelWeight + ";");
        }
        if (StringUtils.isNotBlank(productionBeat)) {
            buffer.append("生产节拍=" + productionBeat + ";");
        }
        if (buffer.length() > 0) {
            return "调试及样件生产状态{" + buffer.toString() + '}';
        }
        return null;
    }
}
